package xkp.lesson2;

import java.util.Arrays;

public class ArraysTest {
	public static void main(String[] args) {
		int[] arr = {123,456,1231,65,21,3765,72131,546,3242,4645654};
		//排序  冒泡、快速
		//查找  普通查找、二分查找
		//其实上述的快速排序与二分查找，在JDK中已经给我们提供的有现成的源码实现
		System.out.println(Arrays.toString(arr));
		Arrays.sort(arr);
		System.out.println(Arrays.toString(arr));
		//查找
		System.out.println(Arrays.binarySearch(arr, 546));
		
	}
}
